const moment = require('moment');
module.exports = {
    title: '刘Dark少爷の空间',
    description: '一个孤独的技术宅',
    head: [
        //头像
        ['link', {rel: 'icon',
        href: 'https://cos.liushaoye.top/index.jpg'}],
    ],
    base: '/',
    markdown: {
        lineNumbers: true
    },
    //主题
    //theme: 'reco',
    themeConfig: {
        dataFormat: 'YYYY年M月D日',
        lastUpdated: '上次更新时间',
        logo: 'https://cos.liushaoye.top/index.jpg',
        nav:[
            //导航栏
            { text: '标签', link: '/tag/' },
            {text: '关于我', link: '/about/'},
            {text: '友情链接', link: '/links/'},
            {text: '打赏', link: '/reward/'},
            {text: '网站源代码', link: 'https://github.com/LiuDarkShaoYe/liushaoye.top'},
            {text: '社区', link: 'https://github.com/LiuDarkShaoYe/liushaoye.top/discussions'},
            {text: '联系我', ariaLable: '联系我',
            items: [{
                text: '邮箱', ariaLable: '邮箱',items: [
                    { text: '个人邮箱', link: 'mailto:scottliu_nonwin@outlook.com'}
                ]
            },
            {
                text: '社交媒体', ariaLable: '社交媒体',
                items: [
                    { text: '哔哩哔哩', link: 'https://space.bilibili.com/551264339'},
                    { text: '知乎', link: 'https://www.zhihu.com/people/LiuDarkShaoYe'},
                    { text: 'GitHub', link: 'https://github.com/LiuDarkShaoYe'},
                    { text: 'Gitee', link: 'https://gitee.com/LiuDarkShaoYe'},
                    { text: 'GitLab', link: 'https://gitlab.com/LiuDarkShaoYe'}
                ]
            }
            ]
        }
        ],

    },
    //永久链接
    permalink: "/archives/:year:month:day.html",
    // 插件
    plugins: [
        '@vuepress/plugin-back-to-top',
        '@vuepress/blog', {
            frontmatters: [
                {
                    id: 'tag',
                    keys: ['tag'],
                    path: '/tag/',
                    layout: 'Tags',
                    scopeLayout: 'Tag'
                }
            ],
            directories: [
                {
                    id: 'post',
                    dirname: 'post',
                    path: '/',
                    pagination: {lengthPage: 5,},
                    
                }
            ]
        },
        '@vuepress/last-updated',{
            dateOptions:{
                hour12:false
            },
            transformer: (timestamp,lang) => {
                const moment = require('moment')
                moment.locale(lang)
                return moment(timestamp).fromNow()
            }
        },
        '@vuepress/nprogress',
    ],
}
